<#escape x as (x)!> <#include "base.ftl"/> <#macro customzone>
<div id="main">
	<#-- main zone --> <#if main?exists> <@main/> </#if>
</div>
<div id="sidebar">
	<#-- sidebar zone --> <#if sidebar?exists> <@sidebar/> </#if>
</div>
</#macro> <#-- sidebar --> <#macro sidebar> <#-- 零散 -->
<div class="block">
	<a href="/feed" target=_blank><img style="border: none;" src="/styles/rss.gif"></img> </a>&nbsp;&nbsp;
	<a href="http://fusion.google.com/add?source=atgs&feedurl=http%3A//www.guanxx.net/feed"><img src="http://gmodules.com/ig/images/plus_google.gif" border="0" alt="Add to Google">
	</a>
</div>
<#-- tag list --> <#if taglist?exists>
<div class="block">
	<div class="header" id=taghead onclick="$('#recenttagcontent').slideToggle('#slow');">
		标签
	</div>
	<div class=content id=recenttagcontent>
		<div class=item>
			<#list taglist as tag>
			<a href="/blog/post?tag=${tag.name}">${tag.name}(${tag.count})</a> </#list>
		</div>
	</div>
</div>
</#if> <#-- recent post --> <#if recentpostlist?exists>
<div class="line">&nbsp;</div>
<div class="block">
	<div class="header" id=recentposthead onclick="$('#recentpostcontent').slideToggle('#slow');">
		最近发表文章
	</div>
	<div class=content id=recentpostcontent>
		<#list recentpostlist as post>
		<div class=item>
			<a href="/blog/post?action=view&postid=${post.id}">${post.title}</a>
		</div>
		</#list>
	</div>
</div>
</#if> <#-- blog link --> <#if bloglinklist?exists>
<div class="line">&nbsp;</div>
<div class="block">
	<div class="header" id="linkhead" onclick="$('#linkcontent').slideToggle('#slow');">
		链接
	</div>
	<script type="text/javascript">
		<!--
		function DeleteBlogLink(id, name){
			if(confirm("确定要删除  \"" + name + "\"?")){
				window.location = "/blog/bloglink?action=delete&delid=" + id;
			}
		}
		//-->
	</script>
	<div class=content id="linkcontent">
		<#if bloglinklist?exists> <#list bloglinklist as bloglink>
		<div class=item>
			<a href="${bloglink.url.value}" title="${bloglink.description}" target="_blank">${bloglink.text}</a> <#if userService.isUserLoggedIn()><#if userService.isUserAdmin()>
			<a href="javascript:void(0);" onclick="DeleteBlogLink('${bloglink.id}', '${bloglink.text}');">删除</a> </#if></#if>
		</div>
		</#list> </#if> <#if userService.isUserLoggedIn() && userService.isUserAdmin()>
		<div class=item>
			<a onclick="$('#addbloglink').slideToggle('#fast');" href="javascript:void(0);">添加链接</a>
		</div>
		<form action="/blog/bloglink" method="post">
			<input type=hidden name=action id=action value="new" />
			<div class=item style="display: none" id="addbloglink">
				<label for="bloglinkurl">
					URL
				</label>
				<br />
				<input type="text" name="url" id="bloglinkurl" value="http://" style="width: 90%" />
				<br />
				<label for="bloglinktext">
					站点
				</label>
				<br />
				<input type="text" name="text" id="bloglinktext" style="width: 90%" />
				<br />
				<label for="bloglinkdescription">
					描述
				</label>
				<br />
				<input type="text" name="description" id="bloglinkdescription" style="width: 90%" />
				<br />
				<input type="submit" value="增加" />
			</div>
		</form>
		</#if>
	</div>
</div>
</#if> <#-- recent comment --> <#if recentcommentlist?exists>
<div class="line">&nbsp;</div>
<div class="block">
	<div class="header" id="commenthead" onclick="$('#commentcontent').slideToggle('#slow');">
		最近评论
	</div>
	<div class="content" id="commentcontent">
		<#list recentcommentlist as comment>
		<div class="item">
			<div class="info">
				<a href="/blog/post?action=view&postid=${comment.postId}#c${comment.id}">${comment.username?html}</a>
			</div>
			<div class="content">
				<#if comment.plainContent?length lt 31>${comment.plainContent?html} <#else>${comment.plainContent[0..30]?html}...</#if>
			</div>
		</div>
		</#list>
	</div>
</div>
</#if> <#-- recent comment --> <#if archivelist?exists>
<div class="line">&nbsp;</div>
<div class="block">
	<div class="header" id="archivehead" onclick="$('#archivecontent').slideToggle('#slow');">
		归档
	</div>
	<div class="content" id="archivecontent">
		<#list archivelist as archive>
		<div class="item">
			<div class="info">
				<a href="/blog/post?action=archive&archive=${archive.name}">${archive.name}(${archive.count})</a>
			</div>
		</div>
		</#list>
	</div>
</div>
</#if> <#if customsiderbar?exists> <@customsiderbar/> </#if> </#macro> </#escape>
